package BinaryTree;

public class Text {
    public static void main(String[] args) {
        TreeNode tree = new TreeNode(new TreeNode(9),3,new TreeNode(new TreeNode(15),20,new TreeNode(7)));
        //前序遍历
        System.out.println("前序");
        tree.prevRecursion(tree);
        System.out.println();
        tree.prev(tree);

        //中序遍历
        System.out.println("中序");
        tree.midRecursion(tree);
        System.out.println();
        tree.mid(tree);

        //后序遍历
        System.out.println("后序");
        tree.postRecursion(tree);
        System.out.println();
        tree.post(tree);
        System.out.println();

        System.out.println(tree.isSymmetry(tree));
        System.out.println(tree.maximumDepth(tree));

        System.out.println(tree.sequenceMaxDepth(tree));
        System.out.println(tree.sequenceMinDepth(tree));
        System.out.println(tree.minDepth(tree));
    }
}
